import os
import sys
# 请在此输入您的代码

N = int(input())

n = 1
if N != 1:
    while True:
        if (3 ** (n - 1) - 1) / 2 <= N <= (3 ** n - 1) / 2:
            break
        n += 1

print(n)